//
//  ConsultingTableViewCell.m
//  DefendHealth
//
//  Created by 吾诺翰卓003 on 17/2/23.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "ConsultingTableViewCell.h"
#import "Header.h"
@interface ConsultingTableViewCell ()
{
    UIImageView *img;
    UILabel *title;
    UILabel *content;
}
@end
@implementation ConsultingTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        UIView *view1 = [UIView new];
        view1.frame = CGRectMake(0, 0,WindowWidth , 12);
        view1.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:view1];
        
        img = [UIImageView new];
        img.frame = CGRectMake(10, 12, WindowWidth-20, 136);
        img.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:img];
        
        title = [UILabel new];
        title.frame = CGRectMake(10, kMaxY(img.frame)+10, WindowWidth-20, 14);
        title.text = @"31个最应该掌握的饮食常识";
        title.font = FONT(14);
        title.textColor = UIColorFromRGB(0x2d2320);
        title.textAlignment = 0;
        [self.contentView addSubview:title];
        
        content = [UILabel new];
        content.frame = CGRectMake(10, kMaxY(title.frame)+10, WindowWidth-20, 32);
        content.text = @"这里输入内容这里输入内容这里输入内容这里输入内容这里输入内容这里输入内容这里输入内容这里输入内容这里输入内容这里";
        content.font = FONT(12);
        content.textColor = UIColorFromRGB(0x9c9d9d);
        content.textAlignment = 0;
        content.numberOfLines = 1000;
        [self.contentView addSubview:content];
        
        UIImageView *img1 = [UIImageView new];
        img1.frame = CGRectMake(10, kMaxY(content.frame)+16, 12, 12);
        img1.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:img1];
        
        UILabel *lab1 = [UILabel new];
        lab1.frame = CGRectMake(kMaxX(img1.frame)+6, kMaxY(content.frame)+16, 20, 12);
        lab1.text = @"999";
        lab1.font = FONT(10);
        lab1.textColor = UIColorFromRGB(0x9c9d9d);
        lab1.textAlignment = 0;
        [self.contentView addSubview:lab1];
        
        
        UIImageView *img2 = [UIImageView new];
        img2.frame = CGRectMake(kMaxX(lab1.frame)+12, kMaxY(content.frame)+16, 12, 12);
        img2.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:img2];
        
        UILabel *lab2 = [UILabel new];
        lab2.frame = CGRectMake(kMaxX(img2.frame)+6, kMaxY(content.frame)+16, 20, 12);
        lab2.text = @"999";
        lab2.font = FONT(10);
        lab2.textColor = UIColorFromRGB(0x9c9d9d);
        lab2.textAlignment = 0;
        [self.contentView addSubview:lab2];
        
        UIImageView *img3 = [UIImageView new];
        img3.frame = CGRectMake(kMaxX(lab2.frame)+12, kMaxY(content.frame)+16, 12, 12);
        img3.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:img3];
        
        UILabel *lab3 = [UILabel new];
        lab3.frame = CGRectMake(kMaxX(img3.frame)+6, kMaxY(content.frame)+16, 30, 12);
        lab3.text = @"999";
        lab3.font = FONT(12);
        lab3.textColor = UIColorFromRGB(0x9c9d9d);
        lab3.textAlignment = 0;
        [self.contentView addSubview:lab3];
        
        UIView *hui = [UIView new];
        hui.frame = CGRectMake(0, kMaxY(img3.frame)+24,WindowWidth , 5);
        hui.backgroundColor = kLineColor;
        [self.contentView addSubview:hui];
        
        
        
        NSLog(@"--f =%f",kMaxY(view1.frame));
    }
    return self;
}
@end
